<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" import="java.util.*,com.epam.tcs.actions.*,com.epam.tcs.dao.hibernate.entities.*"%>
<%@ include file="../template/header.jsp" %>
<%@ include file="../template/left_menu_alt.jsp" %>
<div id="content">
	<div id="breadcrumbs">
		<c:if test="${requestScope.breadcrumbs != null}">
			<c:set var="i" value="0"/>
			<c:forEach items="${requestScope.breadcrumbs}" var="bc">
				<a href="${pageContext.request.contextPath}${bc.getUrl()}">${bc.getCaption()}</a>		
			</c:forEach>
		</c:if>
	</div>
	<span style="color: green;">
		${requestScope.message}
	</span>

<form method="post" action="${pageContext.request.contextPath}${requestScope.action}" id="lecture_form">
	<table>
			<tr>
				<td>Тема</td>
				<td>
					<a href="${pageContext.request.contextPath}/tcs/theme/show?theme_id=${sessionScope.lecture.theme.theme_id}">${sessionScope.lecture.theme.name}</a>
				</td>				
			</tr>
			<tr>
				<td>Название</td>
				<td>
					<p>${sessionScope.lecture.name}</p>
				</td>
			</tr>			
			<tr>
				<td>Описание</td>
				<td>
					<p>${sessionScope.lecture.description}</p>
				</td>
			</tr>
	</table>
</form>
</div>
<script type="text/javascript">
$(function() {
	$( "#back_to_lecture" ).bind('click', function(){
		window.location = "${pageContext.request.contextPath}/tcs/lecture";
	});	
	$( "#send_form_lecture" ).bind('click', function(){
		sendLectureForm();
	});
});

function sendLectureForm(){
	$("#lecture_form").submit();
}
</script>

<%@ include file="../template/footer.jsp" %>